#ifndef _MFG_H
#define _MFG_H

/* MACRO */


#define  MFG_CSState    uint32

#define  MFG_malloc        osal_mem_alloc
#define  MFG_free          osal_mem_free
#define  MFG_setEvent      osal_set_event
#define  MFG_startTimer    osal_start_timerEx

#define  MFG_LOAD_U16(p,w)   (*p=LO_UINT16(w),*(p+1)=HI_UINT16(w))
#define  MFG_SelfTaskId()    osal_self()

//MFG events
#define  MFG_MSG_IN_EVENT    0x4000
#define  MFG_CMD_RX_EVENT    0x2000
#define  MFG_CMD_TX_EVENT    0x1000
// Green Power Events
#define  MFG_GP_TEMP_MASTER_EVT            0x0800
#define  MFG_GP_EXPIRE_DUPLICATE_EVT       0x0400
#define  MFG_GP_DATA_SEND_EVT              0x0200
// Coord event
#define  MFG_QUERY_EVENT                   0x0080
#define  MFG_PERIOD_EVENT                  0x0040  //every second



/* MACRO */


/* TYPEDEF*/
typedef uint8   uint8_t;
typedef uint16  uint16_t;
typedef uint32  uint32_t;
typedef int8    int8_t;
typedef int16   int16_t;
typedef int32   int32_t;

typedef uint8_t mfgDevSn_t[9];
typedef uint8_t mfgDevAddr_t[3];

#endif
